/**
 * @ClassName Demo02
 * @Description case的穿透性
 * @Author Li
 * @Date 2022/7/31 9:45
 * @ModifyDate 2022/7/31 9:45
 * @Version 1.0
 */
public class Demo02 {
    public static void main(String[] args) {
        int i = 2;
        switch (i) {
            case 1:
                System.out.println("执行case1");
                break;
            case 2:
                System.out.println("执行case2");
            case 3:
                System.out.println("执行case3");
            case 4:
                System.out.println("执行case4");
                break;
            case 5:
                System.out.println("执行case5");
                break;
            default:
                System.out.println("执行default");
                break;
        }
    }
}
